package day11.Test1;

public class Test1 {
    public static void main(String[] args) {
        Test1 t = new Test1();
        N n = new N();
        Tetrmino ft= new Tetrmino();

        Tetrmino ftz = new Z();
    }
    }
    //继承父类  extends
class N extends Tetrmino{
    public N() {
        super(1,2);//必须在第一行
        System.out.println("子类测试");
    }
    }
class J extends Tetrmino{}
class I extends Tetrmino{}
class O extends Tetrmino{}
class Z extends Tetrmino{}
class T extends Tetrmino{}
class Tetrmino{

    Pointer[] ps;
    int x;
    int y;

    public Tetrmino(int x,int y){
        this.x = x;
        this.y = y;
        System.out.println("父类测试"+x+","+y);
    }
    public Tetrmino(){
        System.out.println("父类测试"+x+","+y);
    }
    public void drop(){this.y++; }
    public void moveLeft(){ this.x--; }
    public void moveRight(){ this.x++; }
    public void printStr(){ System.out.println(this.x+","+this.y); }

}